home *** CD-ROM | disk | FTP | other *** search
/ Know Your Baseball - The Greatest Player Resource / Know Your Baseball - Greatest Player.iso / Baseball / Director / SHARED.CST / 00004_Script_Rollover Scriptsp < prev    next >
Text File  |  1998-09-21  |  5KB  |  212 lines

  1. ---                    scripts which control screen status and rollovers            ------
  2. global gControls, gButtonStatus,gAVI,gButtonStatus2,gAVI1
  3.  
  4.  
  5. on resetscreen
  6.   repeat with x = 21 to 48
  7.     set y = rollover(x)
  8.     if y = 1 then exit repeat
  9.   end repeat
  10.   if y = 0 then screenprompts 5
  11. end
  12.  
  13. on resetscreenKTG
  14.   repeat with x =10 to 48
  15.     set y = rollover(x)
  16.     if y = 1 then exit repeat
  17.   end repeat
  18.   if y = 0 then screenprompts 5
  19. end
  20.  
  21. on resetscreenKTGFly
  22.   repeat with x = 19 to 48
  23.     set y = rollover(x)
  24.     if y = 1 then exit repeat
  25.   end repeat
  26.   if y = 0 then screenprompts 5
  27. end
  28.  
  29. -- displays screen prompts for all areas except KTG
  30.  
  31. on Screenprompts Which
  32.   mFunction(gControls)  which
  33.   put the result into Field "Indicator"
  34. end
  35.  
  36. -- displays screen prompts for players KTG
  37.  
  38. on ScreenpromptsKTG  Which
  39.   mFunction(gControls)  which
  40.   if  the result = Empty  then exit
  41.     if which > 24 then put the result into field "Indicator"
  42.     else
  43.       put " Imagine what the " & the result & "would do in this situation. ¼
  44.  Click on the player to find out." into field "Indicator"
  45.     end if
  46. end
  47.  
  48. -- special prompts for KTG 3 flyball
  49.  
  50. on ScreenpromptsFly  Which
  51.   mFunction(gControls)  which
  52.   if which > 18 and which < 27 then 
  53.     put "If a Flyball was hit the  " & the result & " would cover this area." into field "Indicator"
  54.   else
  55.     put the result into field "Indicator" 
  56.   end if
  57. end
  58.  
  59.  
  60. -- hilites players or balls on the screen
  61.  
  62. on ScreenObjects
  63.   repeat with x = 21  to 33
  64.     if rollover(x) and the castNum of sprite X > 0 and X <> gAVI and X <> gAVI1 then
  65.       set the blend of sprite x  to 100
  66.       screenprompts (x)
  67.       updatestage
  68.     else
  69.       if gButtonStatus2 <> x  then
  70.         if x <> gAVI then 
  71.           set the blend of sprite x  to 0
  72.         end if
  73.       else
  74.         set the blend of sprite x to 100
  75.       end if
  76.     end if
  77.   end repeat
  78. end
  79.  
  80.  
  81.  
  82. on ScreenObjects1
  83.   repeat with x = 21  to 34
  84.     if rollover(x) and the castNum of sprite X > 0  then
  85.       set the blend of sprite x  to 100
  86.       screenprompts (x)
  87.       updatestage
  88.     else
  89.       if gButtonStatus2 <> x  then
  90.         set the blend of sprite x  to 0
  91.       else
  92.         set the blend of sprite x to 100
  93.       end if
  94.     end if
  95.   end repeat
  96. end
  97.  
  98. -- rollover for KTG only (special range)
  99.  
  100. on ScreenObjectsKTG
  101.   repeat with x = 29 to 33
  102.     if rollover(x) and the castNum of sprite X > 0  then
  103.       set the blend of sprite x  to 100
  104.       screenprompts(x)
  105.       updatestage
  106.     else
  107.       if gButtonStatus2 <> x  then
  108.         set the blend of sprite x  to 0
  109.         updatestage
  110.       else
  111.         set the blend of sprite x to 100
  112.       end if
  113.     end if
  114.   end repeat
  115. end
  116.  
  117. -- special range for KTG3 field elememts
  118.  
  119. on Fieldinfo
  120.   repeat with x = 19 to 27
  121.     if rollover(x) and the castNum of sprite X > 0  then
  122.       set the blend of sprite x-9  to 100
  123.       ScreenpromptsFly(x)
  124.       updatestage
  125.     else
  126.       if gButtonStatus2 <> x  then
  127.         set the blend of sprite x -9 to 0
  128.         updatestage
  129.       else
  130.         set the blend of sprite x -9 to 100
  131.       end if
  132.     end if
  133.   end repeat
  134. end
  135.  
  136. --  rollover for showing text for players in KTG
  137.  
  138. on TeamKTG
  139.   repeat with x = 10  to 28
  140.     if rollover(x) and the castNum of sprite X > 0 then 
  141.       screenpromptsKTG (x)
  142.     end if
  143.   end repeat
  144. end
  145.  
  146.  
  147. -- hilites bates in home movie
  148.  
  149. on CrossBats
  150.   if rollover(44) or rollover(45) then
  151.     set the blend of sprite 44 to 100
  152.     set the blend of sprite 45 to 100
  153.     Screenprompts 44
  154.     updatestage
  155.   else
  156.     set the blend of sprite 44 to 0
  157.     set the blend of sprite 45 to 0
  158.   end if
  159.   
  160.   if rollover(46) or rollover(47) then
  161.     set the blend of sprite 46 to 100
  162.     set the blend of sprite 47 to 100
  163.     Screenprompts 47
  164.     updatestage
  165.     
  166.   else
  167.     set the blend of sprite 46 to 0
  168.     set the blend of sprite 47 to 0
  169.   end if
  170. end
  171.  
  172.  
  173. on MenuBanner
  174.   
  175.   repeat with x = 35 to 41
  176.     if rollover(x) and  the castNum of sprite X > 0 then
  177.       set the blend of sprite x  to 100
  178.       set which = x 
  179.       screenprompts which
  180.       updatestage
  181.     else
  182.       if gButtonStatus <> x  then
  183.         set the blend of sprite x  to  0
  184.       else
  185.         set the blend of sprite x to 100
  186.       end if
  187.     end if
  188.   end repeat
  189.   resetscreen
  190. end
  191.  
  192.  
  193.  
  194. on MenuBannerKTG
  195.   repeat with x = 35 to 39
  196.     if rollover(x) and  the castNum of sprite X > 0 then
  197.       set the blend of sprite x  to 100
  198.       set which = x 
  199.       screenprompts which
  200.       updatestage
  201.     else
  202.       if gButtonStatus <> x  then
  203.         set the blend of sprite x  to  0
  204.       else
  205.         set the blend of sprite x to 100
  206.       end if
  207.     end if
  208.   end repeat
  209.   resetscreenKTG
  210. end
  211.  
  212.